use seminix::{
    bsp::{define_console, define_cpus, define_irqchip, define_memrange},
    drivers::{console::amba_pl011::Pl011, irqchip::irq_gic::IrqchipGic},
    irq::IrqManage,
    space::addr::phys_to_io,
    sync::spinlock::Spinlock,
    utils::sizes::SZ_4G,
};

#[define_cpus]
pub static NR_CPUS: usize = 8;

#[define_memrange]
pub static MEM_RANGE: (usize, usize) = (0x40000000, SZ_4G);

#[define_console]
static PL011: Spinlock<Pl011> = Spinlock::new(Pl011::new(phys_to_io(0x9000000), 100, 115200));

#[define_irqchip]
static IRQ_MANAGE: IrqManage<IrqchipGic, 1020> =
    IrqManage::new(IrqchipGic::new(phys_to_io(0x8000000), 0x10000, phys_to_io(0x8010000), 0x10000));
